package frobagroup.entities.backstage;

import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.Transient;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

/**
 * Created by Tinsley on 2017/4/19.
 */
@Data
@NoArgsConstructor
@Document(collection = "comment")
public class Comment {

    @Id
    private String id;
    private String commentorId;
    private String pId;
    private String commentorName;
    private String avatarUrl;
    private String content;
    private Date commentDate;
    private String status;
    private boolean anonymity;
    private int thumbsUp;
//    private String replyId;
//    private String replyContent;
//    private Date replyDate;
//    private Set<String> replyThumbsUpIds = new HashSet<>();
    private Set<String> commentThumbsUpIds = new HashSet<>();
    @Transient
    private boolean whetherReplyThumbsUp = false;
    @Transient
    private boolean whetherCommentThumbsUp = false;
}
